<div class="content">
    <div id="example_title">
        <h1>Clipboard Copy</h1>
        If you select records and click copy shortcuts (ctrl+c / cmd+c), it will copy selected records to the clipboard which you can
        later paste into text editor or spreadsheet. But you also can add a clipboard copy icon for each cell.
    </div>
    <div id="example_view"></div>
    <div id="example_code"></div>
</div>

<!--CODE-->
<div id="grid" style="width: 600px; height: 400px;"></div>

<!--CODE-->
<script type="module">
import { w2grid } from '__W2UI_PATH__'

let grid = new w2grid({
    name: 'grid',
    box: '#grid',
    columns: [
        { field: 'fname', text: 'First Name', size: '120px', searchable: 'text', clipboardCopy: "Copy First Name to Clipboard" },
        { field: 'lname', text: 'Last Name', size: '120px', searchable: 'text', clipboardCopy: true },
        { field: 'email', text: 'Email', size: '40%', clipboardCopy: true },
        { field: 'sdate', text: 'Start Date', size: '120px', clipboardCopy: true }
    ],
})
grid.load('data/list4.json')
</script>

<!--CODE-->

<!--CODE-->
{
    "total": 9,
    "records": [
        { "recid": 1, "fname": "John", "lname": "Doe", "email": "jdoe@gmail.com", "sdate": "4/3/2012" },
        { "recid": 2, "fname": "Stuart", "lname": "Motzart", "email": "jdoe@gmail.com", "sdate": "4/3/2012" },
        { "recid": 3, "fname": "Jin", "lname": "Franson", "email": "jdoe@gmail.com", "sdate": "4/3/2012" },
        { "recid": 4, "fname": "Susan", "lname": "Ottie", "email": "jdoe@gmail.com", "sdate": "4/3/2012" },
        { "recid": 5, "fname": "Kelly", "lname": "Silver", "email": "jdoe@gmail.com", "sdate": "4/3/2012" },
        { "recid": 6, "fname": "Francis", "lname": "Gatos", "email": "jdoe@gmail.com", "sdate": "4/3/2012" },
        { "recid": 7, "fname": "Mark", "lname": "Welldo", "email": "jdoe@gmail.com", "sdate": "4/3/2012" },
        { "recid": 8, "fname": "Thomas", "lname": "Bahh", "email": "jdoe@gmail.com", "sdate": "4/3/2012" },
        { "recid": 9, "fname": "Sergei", "lname": "Rachmaninov", "email": "jdoe@gmail.com", "sdate": "4/3/2012" }
    ]
}